<template>
  <el-dialog :title="info.title" :model-value="modelVisible" @close="onClose" :width="500">
    <span>是否全部{{ info.title }}？</span>
    <template #footer>
      <el-button size="small" @click="save" type="primary">确定</el-button>
      <el-button size="small" @click="onClose">取消</el-button>
    </template>
  </el-dialog>
</template>

<script lang="ts">
import { defineComponent, ref, reactive } from 'vue'

export default defineComponent({
  emits: ['update:modelVisible', 'submit'],
  props: {
    modelVisible: {
      type: Boolean,
      required: true,
    },
    info: Object,
  },
  setup(props, { emit }) {
    const onClose = () => {
      emit('update:modelVisible', false)
    }
    const save = () => {
      emit('submit', props.info)
    }
    return {
      onClose,
      save
    }
  },
})
</script>

<style lang="scss" scoped></style>
